home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / devs / ram_handler_gcc.h < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  62 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: ram_handler_gcc.h,v 1.3 1996/10/24 15:50:22 aros Exp $
  4.     $Log: ram_handler_gcc.h,v $
  5.     Revision 1.3  1996/10/24 15:50:22  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.2  1996/10/10 13:16:45  digulla
  9.     ? (Fleischer)
  10.  
  11.     Revision 1.1  1996/09/11 12:52:54  digulla
  12.     Two new devices by M. Fleischer: RAM: and NIL:
  13.  
  14.  
  15.     Desc:
  16.     Lang:
  17. */
  18. #ifndef RAM_HANDLER_GCC_H
  19. #define RAM_HANDLER_GCC_H
  20. #include <aros/libcall.h>
  21. #include <exec/execbase.h>
  22. #include <exec/io.h>
  23. #include <exec/devices.h>
  24. #include <dos/dos.h>
  25. #include <dos/filesystem.h>
  26.  
  27. struct rambase
  28. {
  29.     struct Device device;
  30.     struct ExecBase *sysbase;
  31.     struct DosLibrary *dosbase;
  32.     struct UtilityBase *utilitybase;
  33.     BPTR seglist;
  34.     struct MsgPort *port;        /* Port to put IORequests to */
  35.     struct SignalSemaphore *sigsem;    /* Semaphore for iofs */
  36.     struct IOFileSys *iofs;        /* IORequest to be aborted or NULL */
  37. };
  38.  
  39. #define init(rambase, segList) \
  40. AROS_LC2(struct rambase *, init, AROS_LCA(struct rambase *, rambase, D0), AROS_LCA(BPTR, segList, A0), struct ExecBase *, SysBase, 0, ram)
  41.  
  42. #define open(iob, unitnum, flags) \
  43. AROS_LC3(void, open, AROS_LCA(struct ramrequest *, iob, A1), AROS_LCA(ULONG, unitnum, D0), AROS_LCA(ULONG, flags, D0), struct rambase *, rambase, 1, ram)
  44.  
  45. #define close(iob) \
  46. AROS_LC1(BPTR, close, AROS_LCA(struct ramrequest *, iob, A1), struct rambase *, rambase, 2, ram)
  47.  
  48. #define expunge() \
  49. AROS_LC0(BPTR, expunge, struct rambase *, rambase, 3, ram)
  50.  
  51. #define null() \
  52. AROS_LC0(int, null, struct rambase *, rambase, 4, ram)
  53.  
  54. #define beginio(iob) \
  55. AROS_LC1(void, beginio, AROS_LCA(struct ramrequest *, iob, A1), struct rambase *, rambase, 5, ram)
  56.  
  57. #define abortio(iob) \
  58. AROS_LC1(LONG, abortio, AROS_LCA(struct ramrequest *, iob, A1), struct rambase *, rambase, 6, ram)
  59.  
  60. #endif
  61.  
  62.